#include "deque.h"
using namespace std;

void test_deque()
{
	int i;
	int a[10] = { 0,1,2,3,4,5,6,7,8,9 };
	deque<int> q;
	for (i = 0; i <= 9; i++)
	{
		if (i % 2 == 0)
			q.push_front(a[i]);
		else
			q.push_back(a[i]);
	} 	/*此时队列里的内容是: {8,6,4,2,0,1,3,5,7,9}*/

    	deque<int>::iterator it;
	cout << " print deque content: " << endl;
	for (it = q.begin(); it != q.end(); it++) {
		cout << *it << '\t';
	}
	cout << endl;
	cout << endl;
	cout << endl;
}